package com.atguigu.knife4j.service.impl;

import com.atguigu.knife4j.pojo.User;
import com.atguigu.knife4j.service.UserService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Override
    public List<User> getUserList() {
        return List.of(
                new User("u001","张三丰"),
                new User("u002","张无忌"),
                new User("u003","灭绝")
        );
    }

    @Override
    public void addUser(User user) {
        System.out.println(user);
        System.out.println("添加成功！");
    }

    @Override
    public User getById(String uid) {
        return new User(uid , "张三丰");
    }
}
